package start;

public class Java8Study {

    public static void main(String[] args) {
        lambda();
    }
    public static void lambda() {
        Inter1 inter1 = () -> System.out.println("inter1");
        /*Inter2 inter2 = (s) -> {
            System.out.println(s + "dance");
            return s + "dance";
        };*/
        Inter2 inter2 = s -> s + "dance";
        inter1.eat();
        inter2.dance("who");
    }
}
@FunctionalInterface
interface Inter1 {
    public void eat();
    //public String dance(String name);
}
@FunctionalInterface
interface Inter2 {
    public String dance(String name);
}


